import {defineConfig} from 'vite'
import vue from '@vitejs/plugin-vue'

// https://vitejs.dev/config/
export default defineConfig({
    plugins: [vue()],
    server: {
        //要设置当前访问的ip 否则失效
        // host:"localhost",
        //浏览器自动打开页面
        port: 7103,
        open: false,
        historyApiFallback: true,
        proxy: {
            '/dist': {
                target: 'http://localhost:7101/',
                // 服务器服务地址
                // target: 'http://124.222.94.175:7101/',
                changeOrigin: true,
                rewrite: (path) => path.replace(/^\/dist/, ''),
                logLevel: 'debug'
            }
        }
    }
})
